/*
 * @Description: 因子库列表类型
 * @Author: chenju
 * @Date: 2022-01-18 17:24:04
 * @LastEditors: qingyang
 * @LastEditTime: 2023-01-10 10:36:47
 */

import { FactorSourceEnum } from '@/constants/enum';

// 数据列表详情页面 不包含分页参数 入参
export interface GetFactorListParams {
  status: string;
  // 因子类别
  category?: Nullable<string>;
  // 因子来源
  factorSource?: null | keyof typeof FactorSourceEnum;
  // 因子名称
  name?: Nullable<string>;
  country?: string;
  comment?: string;
  tag?: string;
}

// 数据列表详情页面 返回列表
export interface GetFactorListResult {
  approval: string;
  attachment: string;
  attachmentName: string;
  baseYear: string;
  boundary: string;
  category: string;
  comment: string;
  country: string;
  emissionFactor: string;
  enName: string;
  factorCreateType: string;
  factorDataSource: string;
  factorName: string;
  factorNo: string;
  factorSource: string;
  factorUnit: string;
  releaseDate: string;
  status: string;
  version: string;
}

// 查询单个因子 入参
export interface GetFactorParams {
  // 因子名称
  factorName?: string;
  // 因子类型
  factorSource?: string;
  // 因子库
  factorLibrary?: string;
}

// 查询单个因子 返回
export interface GetFactorResult {
  // 因子ID
  id: string | number;
  // 因子名称
  factorName: string;
  // 因子类型
  factorType: string;
  // 因子库
  factorLibrary: string;
  // 因子单位
  factorUnit: string;
}

export interface IFactorListParams {
  current?: string | number;
  size?: string | number;
  factorName?: string;
  category?: string;
  factorSource?: string;
  baseYear?: string;
  flow?: string; // 'IN_FLOW' | 'OUT_FLOW';
  list?: string;
  nameKeyWords?: any;
  autoMatch?: any;
}

export interface RelationFactorListResult {
  // 因子id
  id: string;
  // 因子名称(CN)
  factorName: string;
  // 因子名称(EN)
  enName: string;
  // 类别枚举
  category: string;
  // 类别中文名
  categoryName: string;
  // 排放因子
  emissionFactor: string;
  // 因子单位
  factorUnit: string;
  // 国别
  country: string;
  // 数据采集周期
  baseYear: string;
  // 因子来源
  factorSource: string;
  // 发布时间
  releaseTime: string;
}

/*
 * @Description:
 * @Author: qingyang
 * @Date: 2022-12-31 15:24:48
 * @LastEditors: qingyang
 * @LastEditTime: 2023-01-02 14:05:30
 */
export interface IApprovalFactorParams {
  type?: null | string;
  category?: null | string;
  factorSource?: null | string;
  baseYear?: Nullable<string>;
  name?: string;
  factorLift?: null | 'ASCENDING' | 'DESCENDING';
}
export interface IApprovalFactorResult {
  factorNo: string;
  factorName: string;
  enName: string;
  category: string;
  emissionFactor: string;
  factorUnit: string;
  country: string;
  baseYear: string;
  status: string;
  rejectReason: string;
  applyTime: string;
}

export interface IApprovalSubmit {
  factorNo: string;
  operateType: string;
  approval: string;
}

export interface IFactorAdd {
  factorNo?: string;
  factorName: string;
  enName: string;
  category: string;
  country: string;
  emissionFactor: string;
  factorUnit: string;
  baseYear: string;
  attachment: string;
  attachmentName: string;
  comment: string;
  factorSource: string;
  tag: string;
}
export interface IFactorDetail extends IFactorAdd {
  factorNo: string;
  factorSource: string;
  factorCreateType: string;
  attachmentName: string;
  creator: string;
  enterpriseName: string;
  email: string;
  price: string;
  validStartDate: string;
  validEndDate: string;
}
